package sheepmixView.client;


import com.google.gwt.user.client.ui.Image;

public class Genre extends Image {


	private String name;
	private boolean selected = false;
	private String oldUrl = "";
	
	public Genre(String name, String i) {
		super(i);
		this.setName(name);
		this.setSize("80px", "80px");
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		if(!this.selected)
			oldUrl = this.getUrl();
		
		this.selected = selected;
		if(selected) {
			this.setUrl("check.png");
		}
		else {
			this.setUrl(oldUrl);
		}
			
	}
	
	
	
}
